<%@ page language="java" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR"%>
<jsp:useBean id="player" class="pe.lucene.web.myrating.Player" scope="session"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<link rel="stylesheet" type="text/css" href="index.css" />
<link rel="stylesheet" type="text/css" href="table.css" />
<link rel="stylesheet" type="text/css" href="input.css" />
<link rel="stylesheet" type="text/css" href="alert.css" />
<title>Record My Rating!</title>
</head>
<body>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
    <!-- title -->
	<tr background="image/back_titlebar.png" height="30">
		<td >MyRating</td>
		<td align="right">ver 0.1</td>
	</tr>
    <!-- Decoration empty bar -->
    <tr>
        <td colspan="2" height="2" bgcolor="#959aa0"></td>
    </tr>
	
	<!-- Player logged in -->
	<% if (player.isLogged()) { %>
		   <!-- Show average Rating point. -->
		   <tr>
		      <td colspan="2" align="center">
              
              <jsp:include page="rating/last.jsp"></jsp:include>
                    
		      </td>
		   </tr>
		   
		    <!--  summary -->
		    <tr>
		       <td colspan="2" align="center">
		       
		       <jsp:include page="rating/average.jsp"></jsp:include>
		       
		       </td>
		    </tr>
		    
		    <!-- recent -->
		    <tr>
		       <td colspan="2" align="center">
		       
		       <jsp:include page="rating/recent.jsp"></jsp:include>
		       
		       </td>
		    </tr>
		    
		    <!-- bottom menu -->
		    <tr>
		       <td colspan="2" align="center">
		       
		       <table cellpadding="4">
		           <tr>
		               <td><a href="rating/add.jsp"><img src="./image/icon_main_add.png"></img></a></td>
		               <td><a href="rating/list.jsp"><img src="./image/icon_main_list.png"></img></a></td>
		               <td><a href="player/update.jsp"><img src="./image/icon_main_profile.png"></img></a></td>
		           </tr>
		       </table>
		       
		       </td>
		    </tr>       
		   <%
	   } else {
	%>
	<!--  Player logged out -->
		<!-- Show Message or other things... -->
		<tr bgcolor="#bec6c9">
		  <td colspan="2" align="center">
		      <table>
		          <tr>
		              <td width="240" height="34" background="image/back_main_alert.png" align="center">
		              <span class="screen_alert">Not Logged in</span>
		              </td>
		          </tr>
		      </table>		      
		  </td>
		</tr>
		
		<tr>
		  <td colspan="2" align="center">
			<!-- Show Login Form -->
			<table border="0">
			  <tr>
			      <td colspan="2" align="center">
			      
			      <!-- logging form -->
			      <form action="player/log_on.jsp" method="post">
			  
			      <table border="0">
			         <tr>
			             <td>
			             <input type="text" size="12" name="id" class="loginForm"></input>
			             </td>
			             <td rowspan="2" align="center" valign="middle">
			             <!-- <img src="image/icon_main_logon.png"></img>-->
			             <input type="image" src="image/icon_main_logon.png" name="Submit" value="Submit"></input>
			             </td>
			         </tr>
			         <tr>
			             <td><input type="password" size="12" name="passwd" class="loginForm"></input></td>
			         </tr>
			      </table>
			      </form>
			      
			      </td>
			  </tr>
		    </table>

		<!-- Show Bottom Menu Icon on logged out, Not Joined -->
		<table cellpadding="4">
			<tr>
				<td><a href="player/add.jsp"><img
					src="./image/icon_main_add.png"></img></a></td>
				<td><a href="rating/list.jsp"><img
					src="./image/icon_main_list.png"></img></a></td>
				<td><a href="player/update.jsp"><img
					src="./image/icon_main_profile.png"></img></a></td>
			</tr>
		</table>
		</td>
		</tr>
		<%
	}
	%>

</table>
</body>
</html>